QUnit.module("ConvertBase", () =>
{
    // 允许误差
    var deviation = 0.0000001;

    QUnit.test("convertBase，把基于base1的进制数字转换为基于base2的进制数字", (assert) =>
    {
        var v = math.convertBase("11111110", 2, 16);
        assert.equal("FE", v);
    });

    QUnit.test("decimalismToBase ，把十进制数字转换为指定进制数字", (assert) =>
    {
        var v = math.decimalismToBase(255, 16);
        assert.equal("FF", v);
    });

    QUnit.test("baseToDecimalism，把指定进制数字转换为十进制数字", (assert) =>
    {
        var v = math.baseToDecimalism("AB", 16);
        assert.equal(v, 10 * 16 + 11);
    });
});